<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:0px;border:0px">
  <t:datagrid name="computerRoomList" checkbox="false" fitColumns="true" title="批阅实验作业" actionUrl="expResultController.do?auditDatagrid" idField="id" fit="true" queryMode="group">
   <t:dgCol title="申请人"  field="applyUser"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="createDate"  field="createDate" hidden="true" formatter="yyyy-MM-dd" queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="expReportAttach"  field="expReportAttach" hidden="true"  queryMode="single"  width="120"></t:dgCol>   
   <t:dgCol title="deviceId"  field="deviceId" hidden="true" queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="hasSendMsg"  field="hasSendMsg" hidden="true" queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="状态值"  field="applyStateValue"  hidden="true"  queryMode="single" width="80" ></t:dgCol> 
   <t:dgCol title="computerRoom"  field="computerRoom.id"  hidden="true"  queryMode="single" width="80" ></t:dgCol> 
   
   <t:dgCol title="主键"  field="id"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="实验室名称"  field="computerRoom.name" queryMode="single"  width="120"></t:dgCol>   
   <t:dgCol title="机床"  field="device.machineName" queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="机床负责教师"  field="device.teacher.realName" queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="预约开始时间"  field="applyDate" formatter="yyyy-MM-dd hh:mm" queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="预约结束时间"  field="applyEndDate" formatter="yyyy-MM-dd hh:mm"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="学生名称"  field="applyUser.realName"  query='true'  queryMode="single"  width="120"></t:dgCol> 
   <t:dgCol title="分数"  field="score"   queryMode="single"  width="60"></t:dgCol>
   <t:dgCol title="状态"  field="isChecked"   formatterjs="function(v,rec){return v==0?'未批阅':'已批阅'}" 
    queryMode="single"  width="60" replace="未批阅_0,已批阅_1" query="true"></t:dgCol>
    <t:dgCol title="操作" field="opt" width="100"></t:dgCol>
   <t:dgFunOpt  funname="downloadAtta(id)" title="下载作业" exp="expReportAttach#empty#false"/>
   <t:dgFunOpt  funname="updateScore(id)" title="打分" />   
  </t:datagrid>
  </div>
 </div>
 		
 <script type="text/javascript">
 function downloadAtta(id){
		window.location.href="cms-attach.do?download&ownerId="+id;
 }

	function updateScore(id){
		 $.dialog({
			  	id:'xxx',
				content: 'url:expResultController.do?showUpdateScore&id='+id,
				lock : true,
				zIndex: getzIndex(), 
				parent:frameElement.api,
				width:480,
				height:150,
				title:'试验作业打分', 
				opacity : 0.3,
				cache:false,
			    ok: function(){
			    	var iframe = this.iframe.contentWindow; 
			    	$('#btn_sub', iframe.document).click();
			    	return false;
			    },
			    cancelVal: '关闭',
			    cancel: true /*为true等价于function(){}*/
		});
	}
 </script>